package com.zhangmeng.tools.controller;

import javafx.fxml.FXML;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import lombok.extern.slf4j.Slf4j;

import java.net.URI;
import java.net.URISyntaxException;

/**
 * @author zhangmeng
 * @date 2023年7月11日14:48:27
 * @version 1.0
 */
@Slf4j
public class LayUiFormController {

    @FXML
    public WebView webView;

    @FXML
    public void initialize() {

        WebEngine engine = webView.getEngine();
        URI url = null;
        try {
            url = this.getClass().getClassLoader().getResource("templates/form.html").toURI();
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }
        engine.load(url.toASCIIString());
    }
}
